/**
 * 工具类
 */
define("util", function() {

	var arr = [];

	var slice = arr.slice;

	var concat = arr.concat;

	var push = arr.push;

	var indexOf = arr.indexOf;

	var getProto = Object.getPrototypeOf;

	var class2type = {};

	var toString = class2type.toString;

	var hasOwn = class2type.hasOwnProperty;

	var class2type = {};

	var toString = class2type.toString;

	var hasOwn = class2type.hasOwnProperty;

	var fnToString = hasOwn.toString;

	var ObjectFunctionString = fnToString.call(Object);

	var util = {
		isFunction: function isFunction(obj) {
			// Support: Chrome <=57, Firefox <=52
			// In some browsers, typeof returns "function" for HTML <object> elements
			// (i.e., `typeof document.createElement( "object" ) === "function"`).
			// We don't want to classify *any* DOM node as a function.
			return typeof obj === "function" && typeof obj.nodeType !== "number";
		},
		isPlainObject: function(obj) {
			var proto, Ctor;

			// Detect obvious negatives
			// Use toString instead of jQuery.type to catch host objects
			if(!obj || toString.call(obj) !== "[object Object]") {
				return false;
			}

			proto = getProto(obj);

			// Objects with no prototype (e.g., `Object.create( null )`) are plain
			if(!proto) {
				return true;
			}

			// Objects with prototype are plain iff they were constructed by a global Object function
			Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
			return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
		}
	};
	util.extend = function() {
		var options, name, src, copy, copyIsArray, clone,
			target = arguments[0] || {},
			i = 1,
			length = arguments.length,
			deep = false;

		// Handle a deep copy situation
		if(typeof target === "boolean") {
			deep = target;

			// Skip the boolean and the target
			target = arguments[i] || {};
			i++;
		}

		// Handle case when target is a string or something (possible in deep copy)
		if(typeof target !== "object" && !isFunction(target)) {
			target = {};
		}

		// Extend jQuery itself if only one argument is passed
		if(i === length) {
			target = this;
			i--;
		}

		for(; i < length; i++) {

			// Only deal with non-null/undefined values
			if((options = arguments[i]) != null) {

				// Extend the base object
				for(name in options) {
					src = target[name];
					copy = options[name];

					// Prevent never-ending loop
					if(target === copy) {
						continue;
					}

					// Recurse if we're merging plain objects or arrays
					if(deep && copy && (util.isPlainObject(copy) ||
							(copyIsArray = Array.isArray(copy)))) {

						if(copyIsArray) {
							copyIsArray = false;
							clone = src && Array.isArray(src) ? src : [];

						} else {
							clone = src && util.isPlainObject(src) ? src : {};
						}

						// Never move original objects, clone them
						target[name] = util.extend(deep, clone, copy);

						// Don't bring in undefined values
					} else if(copy !== undefined) {
						target[name] = copy;
					}
				}
			}
		}

		// Return the modified object
		return target;
	}
	return util;
});
define("dateUitl", function() {
	"use strict";
	var e = {};
	return e.formatDate = function(e, t) {
			if(e instanceof Date || (e = new Date(e)),
				"Invalid Date" == e.toString())
				return "";
			var n = {
				"M+": e.getMonth() + 1,
				"d+": e.getDate(),
				"h+": e.getHours(),
				"m+": e.getMinutes(),
				"s+": e.getSeconds(),
				"q+": Math.floor((e.getMonth() + 3) / 3),
				S: e.getMilliseconds()
			};
			/(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length)));
			for(var r in n)
				new RegExp("(" + r + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? n[r] : ("00" + n[r]).substr(("" + n[r]).length)));
			return t
		}, e.removeTime = function(e) {
			return new Date(e.toDateString())
		},
		e.addMonth = function(e, t) {
			var n = new Date(e);
			return n.setMonth(e.getMonth() + t),
				n
		},
		e.addDate = function(e, t) {
			var n = new Date(e);
			return n.setDate(e.getDate() + t),
				n
		},
		e.addYear = function(e, t) {
			var n = new Date(e);
			return n.setFullYear(e.getFullYear() + t),
				n
		}, e;
});